package demo01;

 class OuterClass {
    public int data1 = 1;
    private int data2 = 2;
    public static int data3 = 3;
//  静态内部类
//    public static class InnerClass{
//        public int data4 = 4;
//        private int data5 = 5;
//        public static int data6 = 6;
//
//        public void test(){
//            System.out.println("静态内部类的 test()");
//        }
//    }
//  实例内部类
     class InnerClass{
        public int data4 = 4;
        private int data5 = 5;
        public int data6 = 6;

        public void test(){
            System.out.println(data1);
            System.out.println(data2);
            System.out.println(data3);
            System.out.println(data4);
            System.out.println(data5);
            System.out.println(data6);
            System.out.println("实例内部类的 test()");
        }
    }

//     class InnerClass{
//        public int data4 = 4;
//        private int data5 = 5;
//        public static int data6 = 6;
//
//        public void test(){
//            System.out.println("实例内部类的 test()");
//        }
//    }
}
